package com.mxpio.erp.common.plm.entity;

import com.mxpio.erp.common.jpa.policy.ResCodeGeneratorPolicy;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "MB_ERP_PLM_PROJECT_TASK_MEMBERS_TIME")
@Schema(description = "项目任务成员工时")
public class ProjectTaskMembersTime extends BaseEntity {
    private static final long serialVersionUID=1L;

    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "主键")
    private String id;

    @Column(name = "TASK_CODE_")
    @Schema(description = "任务编码")
    private String taskCode;

    @Column(name = "PRO_CODE_")
    @Schema(description = "项目编码")
    private String proCode;

    @Column(name = "NAME_")
    @Schema(description = "成员")
    @Dict(dicCode = "username", dicEntity = User.class, dicText = "nickname")
    private String name;

    @Column(name = "NORMAL_WORK_TIME_")
    @Schema(description = "汇总正常工时")
    private BigDecimal normalWorkTime;

    @Column(name = "OVERTIME_WORK_TIME_")
    @Schema(description = "汇总加班工时")
    private BigDecimal overtimeWorkTime;

    public ProjectTaskMembersTime(String k, BigDecimal zero, BigDecimal zero1) {
    }

    public ProjectTaskMembersTime() {

    }
}
